<div class="surveysobject_new">
</div>
<table class="surveysobject">
  <tr class="surveysobject">
    <th class="surveysobject" style="width: 120px;">受信日時</th>
    <th class="surveysobject">送信FAX番号</th>
    <th class="surveysobject">受信FAX番号</th>
    <th class="surveysobject">
	シートコード<br />
	調査対象コード
    </th>
	<% if @current_user.has_administrator_group %>
    <th class="surveysobject">エラー送信種別</th>
	<% end %>
	<% if @current_user.has_survey_role(@current_group.id) %>
    <th class="surveysobject" colspan="2">操作</th>
	<% else %>
    <th class="surveysobject">操作</th>
	<% end %>
  </tr>
  <% count = 0 %>
  <% @answer_sheets.each do |answer_sheet| %>
  <% count = (count + 1) & 1 %>
  <% if count == 0 %>
  <tr class="surveysobject">
  <% else %>
  <tr class="surveysobject_dark">
  <% end %>
    <td class="surveysobject"><%= answer_sheet.date.to_s(:datetime_jp).gsub(/日/, "日<BR>　　　") %></td>
    <td class="surveysobject"><%=h answer_sheet.sender_number %></td>
    <td class="surveysobject"><%=h answer_sheet.receiver_number %></td>
    <td class="surveysobject">
	<%=h answer_sheet.analyzed_sheet_code.blank? ? "_____" : answer_sheet.analyzed_sheet_code %> (<%=h answer_sheet.sheet.sheet_name %>)<br />
	<%=h answer_sheet.analyzed_candidate_code.blank? ? "_____" : answer_sheet.analyzed_candidate_code %> (<%=h answer_sheet.candidate.candidate_name %>)
    </td>
	<% if @current_user.has_administrator_group %>
    <td class="surveysobject"><%=h answer_sheet.printable_srerror %></td>
	<% end %>
    <td class="surveysobject_manage" ><%= link_to '表示', group_survey_answer_sheet_path(@group, @survey, answer_sheet) %></td>
	<% if @current_user.has_survey_role(@current_group.id) %>
    <td class="surveysobject_manage"><%= link_to '削除', group_survey_answer_sheet_path(@group, @survey, answer_sheet), :confirm => '削除してもよろしいですか？', :method => :delete %></td>
	<% end %>
  </tr>
<% end %>
</table>
